﻿<%@ Page Language="C#" MasterPageFile="~/MasterALSafa.Master" AutoEventWireup="true"
    CodeBehind="SRV_BOOKS.aspx.cs" Inherits="School.Pages.BOOKS.SRV_BOOKS" %>

<%@ Register Src="~/UserControls/CampusPackage.ascx" TagName="CampusPackage" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div style="float: right; width: 800px;">
                <table align="right" dir="rtl">
                    <tr>
                        <td colspan="3">
                            <asp:HiddenField ID="HFBookId" runat="server" />
                            <uc1:CampusPackage ID="CampusPackage1" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 85px">
                            الكود
                        </td>
                        <td>
                            <asp:TextBox ID="txtCode" runat="server" Width="200px" MaxLength="40"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtCode"
                                Display="Dynamic" ErrorMessage="*" ForeColor="Red" ValidationGroup="bu">*</asp:RequiredFieldValidator>
                        </td>
                        <td>
                            <asp:Label ID="Label1" runat="server" Width="500px"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 85px">
                            اسم الكتاب
                        </td>
                        <td>
                            <asp:TextBox ID="txtName" runat="server" Width="200px" MaxLength="40"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtName"
                                Display="Dynamic" ErrorMessage="*" ForeColor="Red" ValidationGroup="bu">*</asp:RequiredFieldValidator>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 85px">
                            الوصف
                        </td>
                        <td>
                            <asp:TextBox ID="txtDescrptioin" TextMode="MultiLine" Height="131px" runat="server"
                                Width="200px"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3" style="padding-right: 150px;">
                            <asp:Button ID="btnSaveStation" runat="server" Text="اضافه" CssClass="graybutton"
                                ValidationGroup="bu" Width="81px" OnClick="btnSaveStation_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3" style="color: Green">
                            <asp:Label ID="lblResult" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" style="padding-right: 50px;">
                            <asp:GridView ID="gvData" runat="server" Width="100%" DataKeyNames="Id" AutoGenerateColumns="False"
                                CssClass="Grid" HeaderStyle-CssClass="GridHeaderFooter" AllowPaging="True" FooterStyle-CssClass="GridHeaderFooter"
                                PagerStyle-CssClass="GridPager" AlternatingRowStyle-CssClass="GridItemAltername"
                                OnRowCommand="gvData_RowCommand" AllowSorting="True" OnPageIndexChanging="gvData_PageIndexChanging">
                                <AlternatingRowStyle CssClass="GridItemAltername" />
                                <Columns>
                                    <asp:BoundField DataField="Code" HeaderText="الكود"></asp:BoundField>
                                    <asp:BoundField DataField="Name" HeaderText="الاسم"></asp:BoundField>
                                    <asp:BoundField DataField="CampusName" HeaderText="المجمع"></asp:BoundField>
                                    <asp:BoundField DataField="CertificateName" HeaderText="الشهاده"></asp:BoundField>
                                    <asp:BoundField DataField="StageName" HeaderText="المرحله"></asp:BoundField>
                                    <asp:BoundField DataField="GradeName" HeaderText="الصف"></asp:BoundField>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="False" CommandName="DoEdit"
                                                Text="تعديل"></asp:LinkButton>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:TemplateField>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lnkDelete" runat="server" CausesValidation="False" CommandName="DoDelete"
                                                Text="حذف"></asp:LinkButton>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    </asp:TemplateField>
                                </Columns>
                                <FooterStyle CssClass="GridHeaderFooter" />
                                <HeaderStyle CssClass="GridHeaderFooter" />
                                <PagerStyle CssClass="GridPager" HorizontalAlign="Center" 
                                    VerticalAlign="Middle" />
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
